using System;
using System.Collections.Generic;
using System.Text;
using System.Diagnostics;
using System.Xml.Serialization;

namespace Sogeti.HIPAAJumpstartKit.Schemas
{
    partial class ProfessionalClaim : BaseClaim, IClaim
    {
        [XmlIgnore()]
        public Loop23002 Loop2300
        {
            get
            {
                if (this.Loop2000A.Loop2000B.Loop2300 != null)
                    return this.Loop2000A.Loop2000B.Loop2300;
                else return this.Loop2000A.Loop2000B.Loop2000C.Loop2300;
            }
        }

        #region IClaim Members

        public string PayerName
        {
            get
            {
                return this.Loop2000A.
                    Loop2000B.
                    Loop2010BB.
                    NM1_PayerName_2010BB.
                    NM103_PayerName;
            }
            set
            {
                this.Loop2000A.
                    Loop2000B.
                    Loop2010BB.
                    NM1_PayerName_2010BB.
                    NM103_PayerName = value;
            }
        }

        public string PayerId
        {
            get
            {
                return this.Loop2000A.
                    Loop2000B.
                    Loop2010BB.
                    NM1_PayerName_2010BB.
                    NM109_PayerIdentifier;
            }
            set
            {
                this.Loop2000A.
                    Loop2000B.
                    Loop2010BB.
                    NM1_PayerName_2010BB.
                    NM109_PayerIdentifier = value;
            }
        }

        public string PayerIdQual
        {
            get
            {
                return this.Loop2000A.
                    Loop2000B.
                    Loop2010BB.
                    NM1_PayerName_2010BB.
                    NM108_IdentificationCodeQualifier.ToString();
            }
            set
            {
                this.Loop2000A.
                    Loop2000B.
                    Loop2010BB.
                    NM1_PayerName_2010BB.
                    NM108_IdentificationCodeQualifier =
                    (NM1_PayerName_2010BBNM108_IdentificationCodeQualifier)Enum.Parse(
                        typeof(NM1_PayerName_2010BBNM108_IdentificationCodeQualifier),
                        value);
            }
        }

        #endregion
    }
}
